home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17107 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  31 lines

  1. Newsgroups: comp.lang.c++
  2. Path: library.ucla.edu!zephyr!cloudburst!jshyun
  3. From: jshyun@cloudburst.seas.ucla.edu (John S. Hyun)
  4. Subject: Virtual Template Base Class??
  5. Sender: news@seas.ucla.edu (News Daemon)
  6. Message-ID: <DptK0J.6L1@seas.ucla.edu>
  7. Date: Sat, 13 Apr 1996 21:07:30 GMT
  8. X-Nntp-Posting-Host: cloudburst.seas.ucla.edu
  9. Organization: School of Engineering & Applied Science, UCLA.
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12.   Hi,
  13.  
  14.   I am tyring to use a virtual template base class... i.e.
  15.  
  16.   I have a pure virtual template class "list" which specifies the virtual
  17. member functions append, del, insert, [], = etc. I want the derived
  18. classes to also be templates (template singly linked lists, doubly, etc.)
  19. so I tried: template <class dtype> class singlylinkedlist : virtual
  20. public list <dtype> { /* body */.... etc. but it doesn't work.
  21.   I have also tried several variations of this. If anyone knows how to
  22. do this, please let me know! 
  23.  
  24.   -John
  25.  
  26. --
  27. * John S. Hyun - University of California, Los Angeles                  *
  28. *              - School of Engineering and Applied Sciences             *
  29. *                                                                       *
  30. * e-mail: jshyun@seas.ucla.edu www: http://www.seas.ucla.edu/~jshyun    *
  31.